<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<h:form id="idConselho">
		<p:panel style="background: #69ffb7">
			<h:panelGrid columns="2">
				<h:panelGroup>
					<h:outputLink style="color:green; font-weight: bold;"
						value="perfil.jsf?user=#{conselho.usuario.id}">
										#{conselho.usuario.nome}
									</h:outputLink>
					<p:outputLabel value=" aconselhou este relato."
						style="color:green; font-weight: bold;" />
				</h:panelGroup>
				<p:rating style="padding-left: 40px;" value="#{conselho.avaliacao}"
					cancel="false" readonly="true" />
			</h:panelGrid>
			<div align="center">
				<p:separator style="width: 100%" />
			</div>
			<p
				style="padding-left: 10px; padding-right: 10px; font-family: serif; border: thin; font-size: large; border-color: black; max-width: inherit;">
				#{conselho.descricao}</p>
			<div align="center">
				<p:separator style="width: 100%" />
			</div>
			<h:panelGroup
				rendered="#{sessaoBean.usuario.id != conselho.usuario.id}">
				<p:commandButton id="avaliarButton" process="@this"
					rendered="#{postBean.getAvaliacaoConselho(conselho) == null}"
					oncomplete="dialogAvaliar.show()" value="Avaliar">
					<f:setPropertyActionListener value="#{conselho}"
						target="#{postBean.conselhoAvaliado}" />
				</p:commandButton>
				<ui:remove>
					<h:panelGroup
						rendered="#{postBean.getAvaliacaoConselho(conselho) != null}">
						<h:panelGrid columns="2">
							<p:commandButton id="verAvaliacaoButton" process="@this"
								action="#{postBean.visualizarAvaliacao(conselho)}"
								oncomplete="dialogVerAvaliacao.show()"
								value="Ver minha avaliação">
							</p:commandButton>
						</h:panelGrid>
					</h:panelGroup>
				</ui:remove>
			</h:panelGroup>
		</p:panel>
	</h:form>
</ui:composition>

</html>